﻿/*----------------------------------------------------------------
  //Copyright (C) 2012 赵国伟
  //文件名：ScoresManage.cs
  //文件功能描述：积分管理
  //创建人：赵国伟
  //生成时间：2012/03/17 16:15:00
//----------------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Shopping.Common;
using Shopping.Model;
using Shopping.DAL;

namespace Shopping.BLL
{
    public class UserScoresManage
    {
        private readonly DALUserScoreRecords dalScoreRecord = new DALUserScoreRecords();

        #region "分页返回指定用户的积分记录； by 赵国伟 2012-04-24"
        /// <summary>
        /// 分页返回指定用户的积分记录；
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="p"></param>
        /// <returns></returns>
        public List<UserScoreRecords> QueryListAsPage(int userId, AsPage p)
        {
            string cond = "UserID=" + userId;
            string orderby = "RecordDate desc";
            return dalScoreRecord.QueryListAsPage(cond, orderby, p.CurPage, p.PageSize, out p.TotalCount);
        }
        #endregion


    }
}
